# !/usr/bin/env python
# -*- coding: utf-8 -*-

# 双y轴

if __name__ == '__main__':
    import numpy as np
    import matplotlib.pyplot as plt
    x = np.arange(1, 20)
    y1 = x * x
    y2 = np.log(x)
    plt.plot(x, y1)
    # 添加一个坐标轴，默认0到1
    plt.twinx()
    plt.plot(x, y2, 'r')
    plt.show()
